package com.qk.management.mapper;

import com.qk.entity.Dept;
import com.qk.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface RoleMapper {
    Integer count(@Param("name") String name,
                  @Param("label") String label);
    List<Role> selectByPageS(@Param("name") String name,
                             @Param("label") String label);

    List<Role> rolelists();

    List<Role> selectByPage(@Param("name") String name,
                            @Param("label") String label,
                            @Param("offSet") Integer offSet,
                            @Param("pageSize") Integer pageSize);

    @Select("select * from role where id = #{roleId}")
    Role selectById(Integer roleId);
    void add(Role role);

    Role findById(Integer id);

    void update(Role role);

    void deleteById(Integer id);

    Role selectByLabel(String roleLabel);
}
